/* 全局样式 */
body {
  margin: 0;
  padding: 0;
  background-color: #f0f4f8;
  background-image: linear-gradient(135deg, #f0f4f8 0%, #eef2ff 100%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1e293b;
}

/* 导航栏样式 */
.navbar {
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 0.5rem 1.5rem;
}

.navbar:hover {
  background-color: rgba(255, 255, 255, 0.95);
}

/* 脑电数据分析系统特定样式 */
.eeg-panel {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.eeg-panel:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.eeg-panel-header {
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(241, 245, 249, 0.6);
  margin-bottom: 1.25rem;
}

.eeg-panel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #4f46e5;
  margin-right: 0.75rem;
  position: relative;
  box-shadow: 0 0 0 rgba(79, 70, 229, 0.4);
  animation: pulse-indicator 2s infinite;
}

@keyframes pulse-indicator {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

.eeg-electrode-map {
  position: relative;
  width: 100%;
  height: 320px;
  background-color: #f8fafc;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 0.75rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.eeg-electrode {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(79, 70, 229, 0.5);
  border: 2px solid #4f46e5;
  transform: translate(-50%, -50%);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.eeg-electrode:hover {
  background-color: rgba(79, 70, 229, 0.8);
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.eeg-heatmap {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.eeg-waveform {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background-color: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.eeg-waveform-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.eeg-waveform-alpha {
  stroke: #4f46e5;
}

.eeg-waveform-beta {
  stroke: #ef4444;
}

.eeg-waveform-delta {
  stroke: #10b981;
}

.eeg-waveform-theta {
  stroke: #f59e0b;
}

.eeg-frequency-chart {
  width: 100%;
  height: 220px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.eeg-3d-brain {
  width: 100%;
  height: 320px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.eeg-tab {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: #64748b;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.eeg-tab:hover {
  color: #334155;
}

.eeg-tab.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.eeg-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background-color: #4f46e5;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.6);
}

.eeg-device-info {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.6);
  transition: all 0.3s ease;
}

.eeg-device-info:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.eeg-device-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1rem;
}

.eeg-device-name::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #4f46e5, #6366f1);
  border-radius: 2px;
}

.eeg-device-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: #64748b;
  font-size: 0.875rem;
}

.eeg-action-button {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
}

.eeg-action-button:hover {
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
}

.eeg-action-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.eeg-action-button:hover::after {
  opacity: 1;
  transform: rotate(45deg) translateY(-10%);
}

.eeg-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.eeg-data-table th {
  background-color: #f8fafc;
  padding: 0.85rem 1.25rem;
  font-weight: 500;
  color: #475569;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.eeg-data-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.eeg-data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  color: #334155;
  transition: all 0.2s ease;
}

.eeg-data-table tr:hover td {
  background-color: rgba(241, 245, 249, 0.7);
}

.eeg-data-table tr:last-child td {
  border-bottom: none;
}

/* 查询面板样式 */
.query-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border-radius: 1.25rem;
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.query-panel:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.query-panel input[type="date"],
.query-panel select {
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 0.75rem;
  padding: 0.85rem 1.25rem;
  margin-right: 1.5rem;
  font-size: 0.95rem;
  color: #475569;
  background-color: rgba(248, 250, 252, 0.8);
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.query-panel input[type="date"]:focus,
.query-panel select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background-color: white;
}

.query-panel button {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.2);
  position: relative;
  overflow: hidden;
}

.query-panel button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.query-panel button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(45deg) translateY(100%);
  transition: all 0.6s ease;
  opacity: 0;
}

.query-panel button:hover::after {
  opacity: 1;
  transform: rotate(45deg) translateY(0);
}

/* 数据表格样式 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.data-table th,
.data-table td {
  padding: 1.25rem 1.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.data-table th {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  position: relative;
}

.data-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.data-table tr {
  transition: all 0.2s ease;
}

.data-table tr:hover {
  background-color: rgba(241, 245, 249, 0.7);
}

.data-table td {
  color: #475569;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* 可视化容器样式 */
.visualization-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 1.25rem;
  padding: 2.25rem;
  min-height: 520px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.visualization-container:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

/* D3图表交互样式 */
circle,
rect {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

circle:hover,
rect:hover {
  opacity: 0.9;
  cursor: pointer;
  filter: brightness(1.1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transform: scale(1.05);
}

/* 加载动画样式 */
.loading-spinner {
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  border-top: 3px solid #4f46e5;
  width: 50px;
  height: 50px;
  animation: spin 1.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.15);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 标题样式 */
h1,
h2,
h3 {
  color: #1e293b;
  font-weight: 600;
  letter-spacing: -0.025em;
  position: relative;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1e293b, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, rgba(99, 102, 241, 0));
  border-radius: 3px;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .query-panel {
    padding: 1.75rem;
  }

  .visualization-container {
    padding: 1.75rem;
    overflow-x: auto;
  }

  .data-table th,
  .data-table td {
    padding: 1rem 1.25rem;
  }
}

/* 卡片悬停效果 */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.08);
}

/* 按钮组样式 */
.button-group {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  background-color: rgba(248, 250, 252, 0.8);
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.button-group button {
  background-color: transparent;
  color: #475569;
  border: 1px solid transparent;
  padding: 0.6rem 1.25rem;
  border-radius: 0.6rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
}

.button-group button:hover {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.button-group button.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* 工具提示样式 */
.tooltip {
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.8);
}